import request from '@/utils/request'

export function getInvoiceStatuses () {
  return request({
    url: '/api/Case/Invoice/GetInvoiceStatuses',
    method: 'get',
  })
}

export function getInvoiceTypes () {
  return request({
    url: '/api/Case/Invoice/GetInvoiceTypes',
    method: 'get',
  })
}

export function getEmployees (params) {
  return request({
    url: '/api/Case/Invoice/GetEmployees',
    method: 'get',
    params
  })
}

export function getInvoices (data) {
  return request({
    url: '/api/Case/Invoice/GetInvoices',
    method: 'post',
    data
  })
}

export function getMyInvoices (data) {
  return request({
    url: '/api/Case/Invoice/GetMyInvoices',
    method: 'post',
    data
  })
}

export function getMyExpenseLimitDate () {
  return request({
    url: '/api/Case/Invoice/GetMyExpenseLimitDate',
    method: 'get',
  })
}

export function addInvoice (data) {
  return request({
    url: '/api/Case/Invoice/AddInvoice',
    method: 'post',
    data
  })
}

export function editInvoice (data) {
  return request({
    url: '/api/Case/Invoice/EditInvoice',
    method: 'post',
    data
  })
}

export function deleteInvoice (id) {
  return request({
    url: '/api/Case/Invoice/DeleteInvoice',
    method: 'get',
    params: {
      id
    }
  })
}